package com.example.demo.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * Created by wen.gao on 2018/5/6.
 * 从application.yml加载配置
 */
@Configuration
@ConfigurationProperties(prefix="sendmail")
public class SendmailConfig {

    private String IP;

    private int port;

    public SendmailConfig() {

    }

    public SendmailConfig(String IP, int port) {
        this.IP = IP;
        this.port = port;
    }

    public String getIP() {
        return IP;
    }

    public void setIP(String IP) {
        this.IP = IP;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }
}
